{% load events %}
<table class="monthTable">
{% for week in weeks %}
	<tr>{% for day in week %}{% if day.0 %}
		{% events_count month.year month.month day.0 %}
		<td class="dn{{ day.0 }} d{{ day.1 }}{% if events_count %} hasEvent{% endif %}">
			<span class="day">{{ day.0 }}</span>
			{% if events_count %}
				<a href="#events-{{ month.year }}-{{ month.month }}-{{ day.0 }}">{{ events_count }} event{{ events_count|pluralize:"o,i"}}</a>
			{% endif %}
		</td>{% else %}
		<td class="outOfMonth"></td>{% endif %}{% endfor %}
	</tr>{% endfor %}
</table>